package com.zy.business.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description  钉钉考勤记录表
 * @Author  zhangxiaojia
 * @Date 2020-11-03
 */

@Data
@ApiModel
@TableName("tb_attendance_record" )
public class TbAttendanceRecord  implements Serializable {

	private static final long serialVersionUID =  9070201182209926164L;

	/**
	 * 主键
	 */
   	 @TableId(value="id")
	private Long id;

	/**
	 * 用户id
	 */
   	 @TableField("user_id" )
	 @ApiModelProperty(value ="用户id")
	private Long userId;


	/**
	 * 考勤类型（OnDuty：上班；OffDuty：下班）
	 */
   	 @TableField("check_type" )
	 @ApiModelProperty(value ="考勤类型（OnDuty：上班；OffDuty：下班）")
	private String checkType;

	/**
	 * 结果：Normal：正常;Early：早退;Late：迟到;SeriousLate：严重迟到；Absenteeism：旷工迟到；NotSigned：未打卡
	 */
   	 @TableField("time_result" )
	 @ApiModelProperty(value ="结果：Normal：正常;Early：早退;Late：迟到;SeriousLate：严重迟到；Absenteeism：旷工迟到；NotSigned：未打卡")
	private String timeResult;

	/**
	 * 计算迟到和早退，基准时间
	 */
   	 @TableField("base_check_time" )
	 @ApiModelProperty(value ="计算迟到和早退，基准时间")
	 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private Date baseCheckTime;

	/**
	 * 实际打卡时间
	 */
   	 @TableField("user_check_time" )
	 @ApiModelProperty(value ="实际打卡时间")
	 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	 private Date userCheckTime;

	/**
	 * 数据来源:HK：门禁打卡;IN：内勤;OUT：外勤
	 */
   	 @TableField("source_type" )
	 @ApiModelProperty(value ="数据来源:HK：门禁打卡;IN：内勤;OUT：外勤")
	private String sourceType;

	/**
	 * 工作日期
	 */
	@TableField("work_date" )
	@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
   	 private Date workDate;

	/**
	 * 考勤位置
	 */
	@TableField("address" )
	@ApiModelProperty(value ="考勤位置")
	private String address;

	@TableField("phone_url" )
	@ApiModelProperty(value ="外勤照片")
	private String phoneUrl;

	@TableField("remark" )
	@ApiModelProperty(value ="备注")
	private String remark;

	@TableField(exist = false)
	private String openId;

	@TableField("longitude" )
	@ApiModelProperty(value ="经度")
	private String longitude;

	@TableField("latitude" )
	@ApiModelProperty(value ="纬度")
	private String latitude;

}
